/* 
 * components.css
 * 提供医学影像查看器的组件特定样式
 * 包含交互控件、按钮和特定元素的样式
 */

@import './variables.css';

/* 工具按钮样式 */
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) 0;
  width: 100%;
  height: 60px;
  border-radius: var(--border-radius-md);
}

.tool-btn i {
  font-size: 20px;
  margin-bottom: var(--spacing-xs);
}

.tool-btn span {
  font-size: var(--font-size-sm);
}

/* 面板切换控件 */
.panel-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.panel-toggle:hover {
  transform: translateY(-50%) translateX(-50%) scale(1.1);
}

/* 序列面板内容 */
.studies-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-xs);
}

.study-item {
  margin-bottom: var(--spacing-sm);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.study-header {
  padding: var(--spacing-sm);
  cursor: pointer;
  background-color: #2c3e50;
  transition: var(--transition-fast);
}

.study-header:hover {
  background-color: #34495e;
}

.study-header.active {
  background-color: #2c3e50;
  border-left: 3px solid var(--primary-color);
}

.study-date {
  font-size: var(--font-size-sm);
  color: var(--primary-color);
  font-weight: bold;
}

.study-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-list {
  padding: var(--spacing-xs);
}

.series-item {
  display: flex;
  margin-bottom: var(--spacing-xs);
  padding: var(--spacing-xs);
  background-color: var(--bg-hover);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.series-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.series-item.active {
  background-color: var(--bg-active);
  border-left: 2px solid var(--primary-color);
}

.series-thumbnail {
  width: 50px;
  height: 50px;
  min-width: 50px;
  margin-right: var(--spacing-sm);
  background-color: var(--bg-dark);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: var(--bg-header);
  color: #666;
}

.thumbnail-placeholder i {
  font-size: 24px;
}

.series-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-loading-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.5);
}

.loading-progress {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.series-info {
  flex: 1;
  min-width: 0;
}

.series-modality {
  font-size: var(--font-size-xs);
  color: var(--primary-color);
  font-weight: bold;
}

.series-number {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.series-description {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-count {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* 患者信息浮层 */
.patient-info-overlay {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background-color: rgba(30, 37, 56, 0.9);
  border-radius: var(--border-radius-lg);
  width: 300px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  border: 1px solid var(--border-light);
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.overlay-header i {
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.overlay-header i:hover {
  color: var(--primary-color);
}

.overlay-content {
  padding: var(--spacing-md);
}

.info-row {
  display: flex;
  margin-bottom: var(--spacing-sm);
}

.info-label {
  width: 80px;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.info-value {
  flex: 1;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

/* 图像滑块样式 */
.image-slider-container.vertical {
  width: 30px !important;
  height: 240px !important;
  padding: var(--spacing-xs) 3px !important;
  border-radius: var(--border-radius-md) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: var(--spacing-xs) !important;
}

.image-slider-container.vertical .el-slider {
  margin: 0 !important;
  height: 100% !important;
  width: 20px !important;
}

.image-slider-container.vertical .el-slider__runway {
  width: 2px !important;
}

.image-slider-container.vertical .el-slider__bar {
  width: 2px !important;
}

.image-slider-container.vertical .el-slider__button {
  width: 10px !important;
  height: 10px !important;
  transform: translateX(-4px) !important;
}

.image-slider-container.vertical .el-slider__button:hover {
  transform: translateX(-4px) scale(1.2) !important;
}

/* 状态样式 */
.scrolling {
  cursor: ns-resize;
}

/* 视口元素 */
.cornerstone-element {
  flex: 1;
  width: 100%;
  background-color: var(--bg-dark);
  cursor: crosshair;
} 